package com.saicent.note.core;

import com.saicent.support.model.SimpleModelSupport;

public class Category extends SimpleModelSupport<String> {

	private String name;

	public Category(String id, String name) {
		setId(id);
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public boolean equals(Object obj) {
		if (!(obj instanceof Category)) {
			return false;
		}
		Category category = (Category) obj;
		if (this.getName().equals(category.getName())
				|| this.getId().equals(category.getId())) {
			return true;
		}
		return false;
	}

	@Override
	public int hashCode() {
		return this.getName().hashCode();
	}
}
